package rdobson.management.projectclock;


import java.text.DateFormat;
import java.util.Date;
import java.util.Locale;

import android.app.Activity;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.TextView;



public class ProjectClock extends Activity {
	
	private TextView textBox;
	private Button btnStart;
	private Button btnEnd;
	
    /** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main); 
        
        textBox = (TextView)findViewById(R.id.textbox);
        textBox.setText("Welcome to Project Clock");
        
        btnStart = (Button)findViewById(R.id.start);
        btnEnd = (Button)findViewById(R.id.stop);
        
        btnStart.setOnClickListener(new OnClickListener() {
			
			public void onClick(View v) {
				
				TimeMarker tm = new TimeMarker("Work");
				textBox.setText("A time marker " + tm.getProjectName() + " has started on the " + tm.getDate(DateFormat.SHORT));
				
			}
		});
    }
    
    private String getCurrentTime(){
    	String currentDateTimeString = DateFormat.getDateInstance(DateFormat.SHORT, Locale.UK).format(new Date());
    	return currentDateTimeString;
   
    }
}